

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/images/head.jpg">
  <link rel="icon" type="image/png" href="/images/head.jpg">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="1|2|3|4|5">
  <meta name="author" content="盖世神论">
  <meta name="keywords" content="">
  <title>Arch for Magicbook AMD R5 2500U - My Blog</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.5.3/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.1.2/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />
  



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"gaishishenlun.github.io","root":"/","version":"1.8.5","typing":{"enable":true,"typeSpeed":64,"cursorChar":"_","loop":false},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"copy_btn":true,"image_zoom":{"enable":true},"lazyload":{"enable":true,"onlypost":false},"web_analytics":{"enable":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null}}};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>盖世神伦</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archive/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                友链
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/books/">
                <i class="iconfont icon-books"></i>
                书签
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="Arch for Magicbook AMD R5 2500U">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2021-03-24 14:26" pubdate>
        2021-03-24 14:26:53
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      871 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      10
       分钟
    </span>
  

  
  
    
      <!-- 不蒜子统计文章PV -->
      <span id="busuanzi_container_page_pv" style="display: none">
        <i class="iconfont icon-eye" aria-hidden="true"></i>
        <span id="busuanzi_value_page_pv"></span> 次
      </span>
    
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Arch for Magicbook AMD R5 2500U</h1>
            
            <div class="markdown-body">
              <p>deepin v15（注：2018 款魔法书均预装 windows，2019 才有 deepin pro）直接调不了背光。<br>opensuse tumbleweed 运行中卡死，只能强制重启。<br>ubuntu、kde neon、kubuntu、manjaro、archlinux 同上。</p>
<p>最近才在华为论坛上找到办法，作者则是在 archwiki 上看到的。不过作者打字水平不太好，文内有多处错误，我搞了之后大致如下：</p>
<pre><code class="hljs awk"><span class="hljs-regexp">/etc/m</span>kinitcpio.conf

……
MODULES=(amdgpu radeon)
……</code></pre>



<p>据 wiki 说在 modules 里面按顺序填上 amdgpu radeon 即可解决。不过在此之前我按华为论坛上作者的办法（只填 amdgpu）问题依旧。我如此修改以后问题出现的频率有所减少，但依旧存在。<br>同时，通过经验我还发现，电脑卡死的现象与过热存在一定的相关性。因此，我安装了 tlp 和 tlpui-git（为 tlp 开发的一个 GUI），并将各项设置调为“优先节能（power）”，目前过热的现象大大减少，卡死的现象暂未出现。(在此以后卡死现象依旧存在——5.16 修订)<br>不过我觉得大概还是治标不治本。这篇文章会经常更新。</p>
<p>修订于 2020 年 5 月 15 日</p>
<p>经过多方查找如 bugzilla、manjaro forum，我决定：修改内核参数</p>
<pre><code class="hljs gradle"><span class="hljs-regexp">/etc/</span><span class="hljs-keyword">default</span>/grub

……
GRUB_CMDLINE_LINUX_DEFAULT=<span class="hljs-string">&quot;quiet splash ……&quot;</span>
改为“noacpi nosplash idle=nomwait irqpoll ……”
……

然后 sudo grub-mkconfig -o <span class="hljs-regexp">/boot/g</span>rub/grub.cfg</code></pre>

<p>禁用 C6 状态</p>
<pre><code class="hljs elixir"><span class="hljs-variable">$ </span>yay zenstates-git</code></pre>





<pre><code class="hljs gradle"># vim <span class="hljs-regexp">/etc/m</span>odules-load.d/modules.conf（可能是新文件）加入如下单词：“msr”。

# vim <span class="hljs-regexp">/etc/</span>systemd<span class="hljs-regexp">/system/</span>disable_c6.service （新文件）</code></pre>
<p>内容如下：</p>
<pre><code class="hljs ini"><span class="hljs-section">[Unit]</span>
<span class="hljs-attr">Description</span>=Ryzen Disable C6
<span class="hljs-attr">DefaultDependencies</span>=<span class="hljs-literal">no</span>
<span class="hljs-attr">After</span>=sysinit.target local-fs.target
<span class="hljs-attr">Before</span>=basic.target

<span class="hljs-section">[Service]</span>
<span class="hljs-attr">Type</span>=<span class="hljs-literal">on</span>eshot
<span class="hljs-attr">ExecStart</span>=/usr/bin/zenstates --c6-disable

<span class="hljs-section">[Install]</span>
<span class="hljs-attr">WantedBy</span>=basic.target</code></pre>
<p>然后</p>
<pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> systemctl <span class="hljs-built_in">enable</span> disable_c6.service</span></code></pre>
<p>最后重启。<br>这是我病急乱投医综合三四个回答的结果。修改后，目前暂时一切正常。</p>
<pre><code>修订于 2020 年 5 月 16 日
</code></pre>
<p>然而并没有。</p>
<p>于是我把 kde 的混成器设置从 OpenGL3.1 改成了 2.0，现在暂时没事了。</p>
<p>然后还有吧友提供了另一个方案</p>
<pre><code class="hljs livescript">（/etc/<span class="hljs-keyword">default</span>/grub）：

acpi_osi=<span class="hljs-string">\&quot;Windows</span> <span class="hljs-number">2015</span><span class="hljs-string">\&quot;</span> reboot=kbd ivrs_ioapic[<span class="hljs-number">32</span>]=<span class="hljs-number">00</span>:<span class="hljs-number">14.0</span> amd_iommu=<span class="hljs-literal">on</span> idle=nomwait amdgpu.vm_fragment_size=<span class="hljs-number">9</span> initrd=/boot/amd-ucode.img</code></pre>
<pre><code class="hljs awk">然后 grub-mkconfig -o <span class="hljs-regexp">/boot/g</span>rub/grub.cfg</code></pre>

<pre><code>修订于 2020 年 5 月 25 日
</code></pre>
<p>然而还是有问题！！！！！！！</p>
<p>然后我又找到了一个内核参数，使用方法同上，加入 /etc/default/grub 里然后 grub-mkconfig -o /boot/grub/grub.cfg 吧：</p>
<p>amdgpu.noretry=0</p>
<p>这博文在我高中毕业换电脑以前（2020.7.8 以前）不会停更，因为我现在本子上只装了 arch，所以我一定会和这错误死磕到底！！！特地格了 win10，就为了逼自己干掉你！！！</p>
<p>修订于 2020 年 5 月 27 日</p>
<p>卡死现象仍未得到解决，然而频率以及致命性（下文谈）已有所下降。</p>
<p>我发现卡死有两种：</p>
<p>完全地卡死，鼠标动不了，键盘无响应，只能强制重启。<br>图像卡死，但可切换至 tty，在 tty 下 ps -ax | grep kwin 可发现 kwin 处于僵尸（Z）状态，直接 kill pid 无效（SIGTERM），需要 kill -s 9（SIGKILL）才可以。这之后切换回图形界面，发现其它一切正常，可在图形界面的终端下再次启动 kwin_x11。</p>
<p>其中 1.错误已不再发生。</p>
<pre><code>修订于 2020 年 5 月 28 日
</code></pre>
<p>自 5 月 28 日至目前为止，两种现象均未发生，可以认为，我解决了问题。个人认为比较关键的两点是</p>
<p>禁用 C6 / idle=nomwait<br>将混成器从 OpenGL3.1 调成 2.0</p>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2021/04/15/%E5%B5%8C%E5%85%A5%E5%BC%8FLinux%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%BC%80%E5%8F%91/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">嵌入式Linux应用程序开发</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2021/03/22/hello-world/">
                        <span class="hidden-mobile">Hello World</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>盖世神伦</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Blog</span></a> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  

  

</footer>
<!-- SCRIPTS -->

  <script  src="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":200})
    NProgress.start()
    document.addEventListener('DOMContentLoaded', function() {
      window.NProgress && window.NProgress.inc();
    })
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.5.3/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  



  <script  src="https://cdn.staticfile.org/tocbot/4.12.0/tocbot.min.js" ></script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.3.0/anchor.min.js" ></script>



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    (function () {
      var path = "/local-search.xml";
      var inputArea = document.querySelector("#local-search-input");
      inputArea.onclick = function () {
        searchFunc(path, 'local-search-input', 'local-search-result');
        this.onclick = null
      }
    })()
  </script>












  

  

  

  

  

  





<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>




  <script src='https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js'></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize({theme: 'forest'});
    }
  </script>



</body>
</html>
